<script setup lang="ts">
import { useUserInfoStore } from '@/store/userInfo'

const userInfoStore = useUserInfoStore()

onLoad((options) => {
  if (options && options.pid && !userInfoStore.userInfo?.token)
    uni.reLaunch({ url: `/pages/login?pid=${options.pid}` })
  else
    uni.reLaunch({ url: '/pages/home' })
})
</script>

<template>
  <view class="min-h-screen bg-white" />
</template>

<route type="home" lang="yaml">
name: 'index'
style:
  navigationStyle: 'custom'
layout: 'custom'
</route>
